import {natsClient} from "@/utils/nats_client";


/**
 * 订阅用户在线状态
 * @param callback 回调函数
 *
 * $report.${projectName}.{mainVersion}.{localClientId}.{module}.{directive}.[{params | token | identifier}]
 */
export function subUserState(callback){
    natsClient.sub(`$report.$rv.v1.*.user.state` , callback)
}


export function unsubUserState(){
    natsClient.unsub(`$report.$rv.v1.*.user.state`)
}

